home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / OEMNADNF.IN_ / oemnadnf.inf
INI File  |  1996-07-12  |  34KB  |  834 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     EISA
  5.     "Jazz-Internal Bus"
  6. [Options]
  7.     CPQTOK
  8.     BONSAI
  9.     RODAN
  10.     NETFLX
  11.     DURANGO
  12.     MAPLE
  13. [FileConstants]
  14.     UtilityInf      = "UTILITY.INF"
  15.     subroutineinf   = "SUBROUTN.INF"
  16.     SoftwareType    = "driver"
  17.     Exit_Code       = 0
  18.     NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  19.     IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  20.     NETFLX_1BYTE    = 6361358
  21.     DURANGO_1BYTE   = 6295822
  22.     MAPLE_1BYTE     = 6295822
  23.     BONSAI_1BYTE    = 6426894
  24.     RODAN_1BYTE     = 6492430
  25.     BonsaiString    = "BONSAI"
  26.     RodanString     = "RODAN"
  27.     Manufacturer    = "Microsoft"
  28.     ProductMajorVersion     = "4"
  29.     ProductMinorVersion     = "0"
  30.     ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  31.     ProductSoftwareName     = "NETFLX"
  32.     ProductSoftwareImagePath = "\SystemRoot\system32\drivers\netflx.sys"
  33.     NetRuleSoftwareType     = "netflxSys ndisDriver netflxDriver"
  34.     NetRuleSoftwareUse      = $(SoftwareType)
  35.     NetRuleSoftwareBindForm = """NetflxSys"" yes no container"
  36.     NetRuleSoftwareClass    = {"netflxDriver basic"}
  37.     NetRuleSoftwareBindable = {"netflxDriver netflxAdapter non exclusive 100"}
  38.     ProductHardwareName     = "NETFLX"
  39.     NetRuleHardwareType     = "netflx netflxAdapter"
  40.     NetRuleHardwareBindForm = " yes yes container"
  41.     NetRuleHardwareClass    = {"netflxAdapter basic"}
  42.     ProductOpSupport     = 134 
  43.     ProductOtherOpSupport     = 132 
  44.     ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  45.     ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  46.     NetCardKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\Windows NT\CurrentVersion\NetworkCards"
  47. [GeneralConstants]
  48.     from      = ""
  49.     to        = ""
  50.     ExitCodeOk     = 0
  51.     ExitCodeCancel = 1
  52.     ExitCodeFatal  = 2
  53.     KeyNull         = ""
  54.     MAXIMUM_ALLOWED   = 33554432
  55.     RegistryErrorIndex = NO_ERROR
  56.     KeyProduct      = ""
  57.     KeyParameters   = ""
  58.     TRUE            = 1
  59.     FALSE           = 0
  60.     NoTitle            = 0
  61.     ExitState   = "Active"
  62.     OldVersionExisted = $(FALSE)
  63.     DriverPath      = $(!STF_NTPATH)\drivers
  64.     AdpList = {}
  65.     DualNicList = {}
  66.     AddAdpCount = 0
  67. [date]
  68.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  69. [Identify]
  70.     read-syms Identification
  71.     set Status     = STATUS_SUCCESSFUL
  72.     set Identifier = $(OptionType)
  73.     set Media      = #("Source Media Descriptions", 1, 1)
  74.     Return $(Status) $(Identifier) $(Media)
  75. [ReturnOptions]
  76.     set Status        = STATUS_FAILED
  77.     set OptionList     = {}
  78.     set OptionTextList = {}
  79.     set LanguageList = ^(LanguagesSupported, 1)
  80.     Ifcontains(i) $($0) in $(LanguageList)
  81.         ifstr(i) $($1) == ""
  82.            goto returnoptions
  83.         endif
  84.         set PlatformList = ^(PlatformsSupported, 1)
  85.         Ifcontains(i) $($1) in $(PlatformList)
  86.            goto returnoptions
  87.         else
  88.            set Status = STATUS_NOTSUPPORTED
  89.            goto finish_ReturnOptions
  90.         endif
  91.     else
  92.         set Status = STATUS_NOLANGUAGE
  93.         goto finish_ReturnOptions
  94.     endif
  95. returnoptions = +
  96.     set TempOptionList     = ^(Options, 1)
  97.     set TempOptionTextList = ^(OptionsText$($0), 1)
  98.     Debug-Output "OEMNADNF.INF: TempOptioList is: "$(TempOptionList)
  99.     Debug-Output "OEMNADNF.INF: TempOptionTextList is: "$(TempOptionTextList)
  100.     set OptionList = {}
  101.     set OptionTextList = {}
  102.     ForListDo $(TempOptionList)
  103.         ifstr(i) $($) != "CPQTOK"
  104.             Debug-Output "OEMNADNF.INF: added option: "$($)" to option list"
  105.             Debug-Output "OEMNADNF.INF: added option test: "*( $(TempOptionTextList), $(#) )
  106.             set OptionList = >( $(OptionList), $($) )
  107.             set OptionTextList = >( $(OptionTextList), *( $(TempOptionTextList), $(#) ) )
  108.         endif
  109.     EndForListDo
  110.     Debug-Output "OEMNADNF.INF: TempOptioList is: "$(OptionList)
  111.     Debug-Output "OEMNADNF.INF: TempOptionTextList is: "$(OptionTextList)
  112.     set Status         = STATUS_SUCCESSFUL
  113. finish_ReturnOptions = +
  114.     Return $(Status) $(OptionList) $(OptionTextList)
  115. [InstallOption]
  116.     set Option   = $($1)
  117.     set SrcDir   = $($2)
  118.     set AddCopy  = $($3)
  119.     set DoCopy   = $($4)
  120.     set DoConfig = $($5)
  121.     set LanguageList = ^(LanguagesSupported, 1)
  122.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  123.         Return STATUS_NOLANGUAGE
  124.     endif
  125.     Debug-Output "OEMNADNF.INF: STF_CWDIR is: "$(!STF_CWDIR)
  126.     Debug-Output "OEMNADNF.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  127.     set-subst LF = "\n"
  128.     read-syms GeneralConstants
  129.     read-syms FileConstants
  130.     read-syms DialogConstants$(!STF_LANGUAGE)
  131.     ifstr(i) $(!NTN_Origination) == "NCPA"
  132.         set Continue = $(OK)
  133.     endif
  134.     read-syms FileConstants$(!STF_LANGUAGE)
  135.     detect date
  136.     set-title  $(FunctionTitle)
  137.     set to   = Begin
  138.     set from = Begin
  139.     set CommonStatus = STATUS_SUCCESSFUL
  140.     EndWait
  141. Begin = +
  142.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  143.         set StartLabel = removeadapter
  144.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  145.         set StartLabel = UpgradeSoftware
  146.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  147.         set StartLabel = bindingadapter
  148.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  149.         set CommonStatus = STATUS_REBOOT
  150.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  151.             Debug-Output "Cannot configure the Compaq Netflex driver software."
  152.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  153.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  154.                 Debug-Output "ShellCode error: cannot get an error string."
  155.                 goto ShellCodeError
  156.             endif
  157.             set Error = $($R0)
  158.             set from = end
  159.             set to = end
  160.             goto nonfatal
  161.         endif
  162.         set CommonStatus = STATUS_REBOOT
  163.         set StartLabel = configureadapter
  164.     else
  165.         set StartLabel = installadapter
  166.         set OEM_ABANDON_OPTIONS = {}
  167.         set OEM_ABANDON_SOFTWARE = FALSE
  168.         set OEM_ABANDON_ON = TRUE
  169.     endif
  170.     set from = $(fatal)
  171.     set to = $(fatal)
  172.     goto $(StartLabel)
  173. installadapter = +
  174.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  175.     Ifstr $(KeyProduct) != $(KeyNull)
  176.     CloseRegKey $(KeyProduct)
  177.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  178.             Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  179.                 $(ProductVersion)
  180.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  181.                 goto ShellCodeError
  182.             endif
  183.             goto end
  184.         else
  185.             set OldVersionExisted = $(TRUE)
  186.         endif
  187.     endif
  188.     goto nextstep
  189. configureadapter = +
  190.     Ifstr $(KeyProduct) == $(KeyNull)
  191.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  192.         Ifstr $(KeyProduct) == $(KeyNull)
  193.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  194.             Debug-Output "Cannot find component product key"
  195.             goto fatalregistry
  196.         Endif
  197.     Endif
  198.     Debug-Output "INF: Shelling to FindService"
  199.     Shell $(UtilityInf) FindService, $(KeyProduct)
  200.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  201.         Debug-Output "INF: FindService shell failure"
  202.         Goto ShellCodeError
  203.     Endif
  204.     Ifstr(i) $($R0) != NO_ERROR
  205.         Debug-Output "INF: FindService Shell error: "$($R0)
  206.         Goto fatalregistry
  207.     endif
  208.     Set KeyParameters = $($R2)
  209.     ifstr(i) $(KeyParameters) != ""
  210.         GetRegValue $(KeyParameters),"MediaType", MediaTypeInfo
  211.         ifint *($(MediaTypeInfo),4) != 2
  212.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_HARDWARE
  213.             set from = end
  214.             set to = end
  215.             set Error = $($R0)
  216.             goto nonfatal
  217.         else
  218.             GetRegValue $(KeyParameters),"NetworkAddress", NetworkAddressInfo
  219.             set NetworkAddress = *($(NetworkAddressInfo), 4)
  220.             read-syms FileDependentDlg$(!STF_LANGUAGE)
  221.             ui start "NetworkAddress"
  222.             ifstr(i) $(DLGEVENT) == "CONTINUE"
  223.                 set NetworkAddress = *($(EditTextOut),1)
  224.                 SetRegValue $(KeyParameters) {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)}
  225.                 ui pop 1
  226.             else
  227.                 set CommonStatus = STATUS_USERCANCEL
  228.                 ui pop 1
  229.             endif
  230.         endif
  231.         CloseRegKey $(KeyParameters)
  232.     endif
  233.     goto successful
  234. nextstep = +
  235.     StartWait
  236.     set DualPort = FALSE
  237.     ifstr $(Option) == "NETFLX"
  238.         Shell $(UtilityInf), EISAFindBus, $(NETFLX_1BYTE)
  239.     else-ifstr $(Option) == "DURANGO"
  240.         Shell $(UtilityInf), EISAFindBus, $(DURANGO_1BYTE)
  241.     else-ifstr $(Option) == "MAPLE"
  242.         Shell $(UtilityInf), EISAFindBus, $(MAPLE_1BYTE)
  243.     else-ifstr $(Option) == "BONSAI"
  244.         Shell $(UtilityInf), EISAFindBus, $(BONSAI_1BYTE)
  245.         set DualPort = TRUE
  246.     else
  247.         Shell $(UtilityInf), EISAFindBus, $(RODAN_1BYTE)
  248.         set DualPort = TRUE
  249.     endif
  250.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  251.         goto ShellCodeError
  252.     endif
  253.     ifstr $($R0) != "NO_ERROR"
  254.         set Error = $($R0)
  255.         goto fatal
  256.     endif
  257.     ifstr(i) $($R1) == {}
  258.         set Error = $(CANNOT_FIND_ANY_CARD)
  259.         set CommonStatus = STATUS_USERCANCEL
  260.         set from = end
  261.         goto nonfatal
  262.     endif
  263.     set AdapterList = $($R1)
  264.     ifint $(OldVersionExisted) == $(FALSE)
  265.         ifstr(i) $(!NTN_InstallMode) == "install"
  266.            Ifstr(i) $(DoCopy) == "YES"
  267.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  268.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  269.                   Goto ShellCodeError
  270.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  271.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  272.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  273.                       goto ShellCodeError
  274.                   endif
  275.                   set Error = $($R0)
  276.                   Goto fatal
  277.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  278.                   Goto successful
  279.               Endif
  280.               Set SrcDir = $($R1)
  281.            Endif
  282.            install "Install-Option"
  283.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  284.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  285.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  286.                   goto ShellCodeError
  287.               endif
  288.               set Error = $($R0)
  289.               goto fatal
  290.            endif
  291.         endif
  292.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  293.             $(ProductSoftwareName), +
  294.             $(ProductSoftwareName), +
  295.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  296.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  297.             $(NetEventDLL)
  298.         Set OEM_ABANDON_SOFTWARE = TRUE
  299.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  300.             goto ShellCodeError
  301.         endif
  302.         set RegistryErrorIndex = $($R0)
  303.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  304.             EndWait
  305.             CloseRegKey $($R1)
  306.             CloseRegKey $($R2)
  307.             CloseRegKey $($R3)
  308.             CloseRegKey $($R4)
  309.             CloseRegKey $($R5)
  310.             goto fatalregistry
  311.         endif
  312.         set SoftProductKey      = $($R1)
  313.         Set SoftNetRuleKey      = $($R2)
  314.         Set SoftServiceKey      = $($R3)
  315.         Set SoftParameterKey    = $($R4)
  316.         Set SoftLinkageKey      = $($R5)
  317.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  318.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  319.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  320.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  321.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  322.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  323.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  324.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  325.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  326.             goto ShellCodeError
  327.         endif
  328.         set RegistryErrorIndex = $($R0)
  329.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  330.             EndWait
  331.             CloseRegKey $(SoftProductKey)
  332.             CloseRegKey $(SoftNetRuleKey)
  333.             CloseRegKey $(SoftServiceKey)
  334.             CloseRegKey $(SoftParameterKey)
  335.             CloseRegKey $(SoftLinkageKey)
  336.             goto fatalregistry
  337.         endif
  338.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  339.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  340.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  341.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  342.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  343.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  344.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  345.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  346.             goto ShellCodeError
  347.         endif
  348.         set RegistryErrorIndex = $($R0)
  349.         CloseRegKey $(SoftProductKey)
  350.         CloseRegKey $(SoftNetRuleKey)
  351.         CloseRegKey $(SoftServiceKey)
  352.         CloseRegKey $(SoftParameterKey)
  353.         CloseRegKey $(SoftLinkageKey)
  354.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  355.             EndWait
  356.             goto fatalregistry
  357.         endif
  358.     endif
  359.     ForListDo $(AdapterList)
  360.         set BusNum = *($($),1)
  361.         set SlotNum = *($($),2)
  362.         Debug-Output $(BusNum)
  363.         Debug-Output $(SlotNum)
  364.         Shell $(UtilityInf), IsNetCardAlreadyInstalled, $(BusNum), +
  365.             $(SlotNum), $(ProductHardware$(Option)Description), $(ProductHardwareName)
  366.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  367.             goto ShellCodeError
  368.         endif
  369.         ifstr $($R0) != "NO_ERROR"
  370.             set Error = $($R0)
  371.             goto fatal
  372.         endif
  373.         set tempvar = $($R1)
  374.         ifstr(i) $(DualPort) == TRUE
  375.             set AdpList = { {1},{2} }
  376.         else
  377.             set AdpList = { {1} }
  378.         endif
  379.         set AddAdpCount = 0
  380.         ifstr(i) $(tempvar) != "YES"
  381.           ForListDo $(AdpList)
  382.             Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  383.             ifint $($R4) != -1
  384.                 Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  385.             endif
  386.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  387.                 goto ShellCodeError
  388.             endif
  389.             set RegistryErrorIndex = $($R0)
  390.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  391.                 EndWait
  392.                 CloseRegKey $($R1)
  393.                 CloseRegKey $($R2)
  394.                 CloseRegKey $($R3)
  395.                 goto fatalregistry
  396.             endif
  397.             Set HardNetCardKey      = $($R1)
  398.             Set HardNetRuleKey      = $($R2)
  399.             Set HardParameterKey    = $($R3)
  400.             set AdapterNumber       = $($R4)
  401.             ifstr $(Option) == "NETFLX"
  402.                 LoadLibrary "x" $(!STF_CWDDIR)netflx.dll !NETFLEX_HANDLE
  403.                 set Option_1Byte = $(NETFLX_1BYTE)
  404.                 LibraryProcedure Result $(!NETFLEX_HANDLE), GetNetFlexMediaType, "EISAAdapter\"$(BusNum), $(SlotNum)
  405.                 set MediaType = *($(Result),1)
  406.                 FreeLibrary $(!NETFLEX_HANDLE)
  407.             else-ifstr $(Option) == "MAPLE"
  408.                 set Option_1Byte = $(MAPLE_1BYTE)
  409.                 set MediaType = 2
  410.             else-ifstr $(Option) == "DURANGO"
  411.                 set Option_1Byte = $(DURANGO_1BYTE)
  412.                 set MediaType = 2
  413.             else-ifstr $(Option) == "BONSAI"
  414.                 set Option_1Byte = $(BONSAI_1BYTE)
  415.                 set MediaType = 1
  416.             else
  417.                 set Option_1Byte = $(RODAN_1BYTE)
  418.                 set MediaType = 2
  419.             endif
  420.             ifint $(MediaType) != 2
  421.                 set OpSupport = $(ProductOtherOpSupport)
  422.             else
  423.                 set OpSupport = $(ProductOpSupport)
  424.             endif
  425.             set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  426.                                    {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  427.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  428.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  429.                                    {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  430.                                    {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)},+
  431.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  432.             Shell  $(UtilityInf), AddValueList, $(HardNetCardKey), $(NewValueList)
  433.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  434.                 goto ShellCodeError
  435.             endif
  436.              ifint $(AddAdpCount) == 0
  437.                 Shell $(UtilityInf), AssignAdapterNumber
  438.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  439.                      goto ShellCodeError
  440.                 endif
  441.                 set AdpNumber1 = $(AdapterNumber)
  442.                 set AdpNumber2 = $($R1)
  443.              endif
  444.              ifstr(i) $(DualPort) == TRUE
  445.                 ifint $(AddAdpCount) == 0
  446.                    set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  447.                            {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  448.                            {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  449.                            {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  450.                            {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  451.                            {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 1},+
  452.                            {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber2) }}
  453.                 else
  454.                    set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  455.                            {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  456.                            {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  457.                            {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  458.                            {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)},+
  459.                            {PortNumber,$(NoTitle),$(!REG_VT_DWORD), 2},+
  460.                            {PairNumber,$(NoTitle),$(!REG_VT_DWORD), $(AdpNumber1) }}
  461.                 endif
  462.              else
  463.                 set NewValueList = {{BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNum)},+
  464.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),2},+
  465.                        {EisaCompressedId,$(NoTitle),$(!REG_VT_DWORD),$(Option_1Byte)},+
  466.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),$(MediaType)},+
  467.                        {SlotNumber,$(NoTitle),$(!REG_VT_DWORD),$(SlotNum)}}
  468.              endif
  469.              Shell  $(UtilityInf), AddValueList, $(HardParameterKey), $(NewValueList)
  470.              ifint $($ShellCode) != $(!SHELL_CODE_OK)
  471.                  goto ShellCodeError
  472.              endif
  473.              set NetworkAddress = ""
  474.              ifint $(MediaType) == 2
  475.                 read-syms FileDependentDlg$(!STF_LANGUAGE)
  476.                 ui start "NetworkAddress"
  477.                 ifstr(i) $(DLGEVENT) == "CONTINUE"
  478.                     set NetworkAddress = *($(EditTextOut),1)
  479.                     SetRegValue $(HardParameterKey) {NetworkAddress,$(NoTitle),$(!REG_VT_SZ),$(NetworkAddress)}
  480.                     ui pop 1
  481.                 endif
  482.              endif
  483.              set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  484.              set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  485.              set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  486.                                  {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  487.                                  {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  488.                                  {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)} }
  489.              Shell  $(UtilityInf), AddValueList, $(HardNetRuleKey), $(NewValueList)
  490.              CloseRegKey $(HardNetCardKey)
  491.              CloseRegKey $(HardNetRuleKey)
  492.              CloseRegKey $(HardParameterKey)
  493.              ifint $($ShellCode) != $(!SHELL_CODE_OK)
  494.                  goto ShellCodeError
  495.              endif
  496.              ifstr(i) $(DualPort) == TRUE
  497.                 set-add AddAdpCount = $(AddAdpCount),1
  498.              endif
  499.           EndForListDo
  500.       endif
  501.     EndForListDo
  502.     goto writeparameters
  503. writeparameters = +
  504.     EndWait
  505.     goto successful
  506. bindingadapter =+
  507.     set Error = "Binding: Sorry, not yet implemented."
  508.     goto fatal
  509. removeadapter = +
  510.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  511.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  512.             $(ProductSoftwareName)
  513.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  514.             Debug-Output "ShellCode error"
  515.             goto ShellCodeError
  516.         endif
  517.         set RegistryErrorIndex = $($R0)
  518.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  519.             goto fatalregistry
  520.         endif
  521.     else
  522.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase)"\NetRules" +
  523.             $(MAXIMUM_ALLOWED) NetRulesKey
  524.         Ifstr $(NetRulesKey) == $(KeyNull)
  525.             Debug-Output "UTILITY.INF: Could not open NetRules key"
  526.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  527.             goto ShellCodeError
  528.         endif
  529.         GetRegValue $(NetRulesKey), "InfOption", RA_InfOptionInfo
  530.         set RA_InfOption = *($(RA_InfOptionInfo), 4)
  531.         ifstr(i) $(RA_InfOption) == $(BonsaiString)
  532.            goto RemoveSecondAdapter
  533.         else-ifstr(i) $(RA_InfOption) == $(RodanString)
  534.            goto RemoveSecondAdapter
  535.         else
  536.            goto RemoveOriginalAdapter
  537.         endif
  538. RemoveSecondAdapter = +
  539.         Shell "", GetSecondAdapter, $(!NTN_RegBase)
  540.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  541.            Debug-Output "ShellCode error"
  542.            goto ShellCodeError
  543.         endif
  544.         set RegistryErrorIndex = $($R0)
  545.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  546.             goto fatalregistry
  547.         endif
  548.         set PortTwo_RegBase = $($R1)
  549.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  550.               $(ProductSoftwareName), $(PortTwo_RegBase)
  551.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  552.            Debug-Output "ShellCode error"
  553.            goto ShellCodeError
  554.         endif
  555.         set RegistryErrorIndex = $($R0)
  556.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  557.            goto fatalregistry
  558.         endif
  559. RemoveOriginalAdapter = +
  560.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  561.               $(ProductSoftwareName), $(!NTN_RegBase)
  562.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  563.            Debug-Output "ShellCode error"
  564.            goto ShellCodeError
  565.         endif
  566.         set RegistryErrorIndex = $($R0)
  567.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  568.            goto fatalregistry
  569.         endif
  570.     endif
  571.     goto end
  572. UpgradeSoftware = +
  573.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  574.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  575.         Ifstr $(KeyProduct) != $(KeyNull)
  576.             install "Install-Update"
  577.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  578.                 goto fatal
  579.             endif
  580.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  581.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  582.             CloseRegKey $(KeyProduct)
  583.         else
  584.             goto fatalregistry
  585.         endif
  586.     endif
  587.     ifstr $(Option) == "NETFLX"
  588.         set MediaType = 2
  589.     else-ifstr $(Option) == "MAPLE"
  590.         set MediaType = 2
  591.     else-ifstr $(Option) == "DURANGO"
  592.         set MediaType = 2
  593.     else-ifstr $(Option) == "BONSAI"
  594.         set MediaType = 1
  595.     else
  596.         set MediaType = 2
  597.     endif
  598.     ifint $(MediaType) != 2
  599.         set OpSupport = $(ProductOtherOpSupport)
  600.     else
  601.         set OpSupport = $(ProductOpSupport)
  602.     endif
  603.     set iSearch = 1
  604. nextnetcard = +
  605.     Shell $(UtilityInf), FindNextNetworkCard, $(ProductHardwareName), $(iSearch)
  606.     set KeyNetcard = $($R0)
  607.     set iSearch = $($R1)
  608.     Debug-Output "OemNadEp.Inf: FindNextNetworkCard "$(KeyNetcard)","$(iSearch)
  609.     Ifstr $(KeyNetcard) != $(KeyNull)
  610.         Debug-Output "OemNadEp.Inf: Setting OperationsSupport value"
  611.         SetRegValue $(KeyNetcard) {OperationsSupport,$(NoTitle),$(!REG_VT_DWORD),$(OpSupport)}
  612.         CloseRegKey $(KeyNetcard)
  613.         goto nextnetcard
  614.     Endif
  615.     goto end
  616. successful = +
  617.     goto end
  618. abandon = +
  619.     ForListDo $(OEM_ABANDON_OPTIONS)
  620.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  621.             $(ProductSoftwareName), $($)
  622.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  623.             Debug-Output "ShellCode error"
  624.             goto ShellCodeError
  625.         endif
  626.         set RegistryErrorIndex = $($R0)
  627.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  628.             goto fatalregistry
  629.         endif
  630.     EndForListDo
  631.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  632.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  633.             $(ProductSoftwareName), FALSE
  634.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  635.             Debug-Output "ShellCode error"
  636.             goto ShellCodeError
  637.         endif
  638.         set RegistryErrorIndex = $($R0)
  639.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  640.             goto fatalregistry
  641.         endif
  642.     endif
  643.     goto end
  644. warning = +
  645.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  646.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  647.         goto ShellCodeError
  648.     endif
  649.     ifstr(i) $($R1) == "OK"
  650.         goto $(to)
  651.     else-ifstr(i) $($R1) == "CANCEL"
  652.         goto $(from)
  653.     else
  654.         goto end
  655.     endif
  656. nonfatal = +
  657.     ifstr(i) $(Error) == ""
  658.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  659.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  660.             goto ShellCodeError
  661.         endif
  662.         set Error = $($R0)
  663.     endif
  664.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  665.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  666.         goto ShellCodeError
  667.     endif
  668.     ifstr(i) $($R1) == "OK"
  669.         goto $(from)
  670.     else
  671.         goto end
  672.     endif
  673. fatalregistry = +
  674.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  675.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  676.         goto ShellCodeError
  677.     endif
  678.     set Error = $($R0)
  679.     goto fatal
  680. fatal = +
  681.     ifstr(i) $(Error) == ""
  682.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  683.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  684.             goto ShellCodeError
  685.         endif
  686.         set Error = $($R0)
  687.     endif
  688.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  689.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  690.         goto ShellCodeError
  691.     endif
  692.     goto setfailed
  693. ShellCodeError = +
  694.     set DlgType      = "MessageBox"
  695.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  696.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  697.     set STF_MB_TYPE  = 1
  698.     set STF_MB_ICON  = 3
  699.     set STF_MB_DEF   = 1
  700.     ui start "Error Message"
  701.     goto setfailed
  702. setfailed = +
  703.     set CommonStatus = STATUS_FAILED
  704.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  705.         set OEM_ABANDON_ON = FALSE
  706.         goto abandon
  707.     endif
  708.     goto end
  709. end = +
  710.     goto term
  711. term = +
  712.     Return $(CommonStatus)
  713. [GetSecondAdapter]
  714.     read-syms GeneralConstants
  715.     read-syms FileConstants
  716.     Split-String $($0), "\", CardList
  717.     set GS_NetCardNum   = *($(CardList),11)
  718.     set GS_HardKeyName = $(!NTN_ServiceBase)"\"$(ProductHardwareName)$(GS_NetCardNum)"\Parameters"
  719.     set RegistryErrorIndex      = NO_ERROR
  720.     OpenRegKey $(!REG_H_LOCAL) "" $(GS_HardKeyName) $(MAXIMUM_ALLOWED) GS_ParametersKey
  721.     Ifstr $(GS_ParametersKey) == $(KeyNull)
  722.        set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  723.        goto GS_Return
  724.     endif
  725.     GetRegValue $(GS_ParametersKey), "PairNumber", GS_AdpNumberInfo
  726.     set GS_AdpNumber = *($(GS_AdpNumberInfo),4)
  727.     set TempNum = $(GS_AdpNumber)
  728.     set ReturnPath = $(NetCardKeyName)"\"$(TempNum)
  729. GS_Return = +
  730.     return $(RegistryErrorIndex) $(ReturnPath)
  731. [Install-Option]
  732.     set STF_VITAL = ""
  733.     ifstr(i) $(AddCopy) == "YES"
  734.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  735.         AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  736.     endif
  737.     ifstr(i) $(DoCopy) == "YES"
  738.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  739.        CopyFilesInCopyList
  740.     endif
  741.     ifstr(i) $(DoConfig) == "YES"
  742.     endif
  743.     Exit
  744. [Install-Update]
  745.    set STF_VITAL        = ""
  746.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  747.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  748.    AddSectionFilesToCopyList Files-DLL $(SrcDir) $(!STF_WINDOWSSYSPATH)
  749.    exit
  750. [Source Media Descriptions]
  751.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom_s.40
  752. [Signature]
  753.     FileType = MICROSOFT_FILE
  754. [GetSignature]
  755.     read-syms Signature
  756.     return $(FileType)
  757. [ProductType]
  758. STF_PRODUCT  = LanmanNT
  759. STF_PLATFORM = I386
  760. [Files-Inf]
  761. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  762. [Files-BONSAI]
  763. 1,NETFLX.BIN , SIZE=999
  764. 1,NETFLX.SYS , SIZE=999
  765. [Files-CPQTOK]
  766. 1,NETFLX.BIN , SIZE=999
  767. 1,NETFLX.SYS , SIZE=999
  768. [Files-DLL]
  769. 1,NETFLX.DLL , SIZE=999
  770. [Files-DURANGO]
  771. 1,NETFLX.BIN , SIZE=999
  772. 1,NETFLX.SYS , SIZE=999
  773. [Files-MAPLE]
  774. 1,NETFLX.BIN , SIZE=999
  775. 1,NETFLX.SYS , SIZE=999
  776. [Files-NETFLX]
  777. 1,NETFLX.BIN , SIZE=999
  778. 1,NETFLX.SYS , SIZE=999
  779. [Files-RODAN]
  780. 1,NETFLX.BIN , SIZE=999
  781. 1,NETFLX.SYS , SIZE=999
  782. [LanguagesSupported]
  783.     ENG
  784. [OptionsTextENG]
  785.     CPQTOK     = "<this option is no longer supported for install>"
  786.     BONSAI     = "COMPAQ NetFlex-2 DualPort ENET Controller"
  787.     RODAN      = "COMPAQ NetFlex-2 DualPort TR Controller"
  788.     NETFLX     = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  789.     DURANGO    = "COMPAQ NetFlex-2 TR Controller"
  790.     MAPLE      = "COMPAQ 32-Bit DualSpeed Token-Ring Controller"
  791. [FileConstantsENG]
  792. ProCaption   = "Windows NT Setup"
  793. ProCancel    = "Cance&l"
  794. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  795.                "Are you sure you want to cancel copying files?"
  796. ProCancelCap = "Network Setup Message"
  797. ProText1     = "Copying:"
  798. ProText2     = "To:"
  799. FunctionTitle   = "COMPAQ NetFlex Adapter Card Setup"
  800. ProductSoftwareDescription        = "COMPAQ ENET-TR EISA Driver"
  801. ProductHardwareBONSAIDescription  = "COMPAQ NetFlex-2 DualPort ENET Controller"
  802. ProductHardwareRODANDescription   = "COMPAQ NetFlex-2 DualPort TR Controller"
  803. ProductHardwareNETFLXDescription  = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  804. ProductHardwareDURANGODescription = "COMPAQ Token-Ring Controllers"
  805. ProductHardwareCPQTOKDescription        = "COMPAQ 32-Bit DualSpeed Token-Ring Controller (ns)"
  806. ProductHardwareMAPLEDescription        = "COMPAQ 32-Bit DualSpeed Token-Ring Controller"
  807. CANNOT_FIND_ANY_CARD            = "Network card is not present in the system"
  808. ProductSoftwareTitle            = "COMPAQ ENET-TR Driver"
  809. ProductHardwareBONSAITitle      = "COMPAQ NetFlex-2 DualPort ENET Controller"
  810. ProductHardwareRODANTitle       = "COMPAQ NetFlex-2 DualPort TR Controller"
  811. ProductHardwareNETFLXTitle      = "COMPAQ NetFlex/NetFlex-2 ENET-TR Controller"
  812. ProductHardwareDURANGOTitle     = "COMPAQ NetFlex-2 TR Controller"
  813. ProductHardwareCPQTOKTitle      = "COMPAQ 32-Bit Token-Ring Controller (ns)"
  814. ProductHardwareMAPLETitle      = "COMPAQ 32-Bit Token-Ring Controller"
  815. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  816. ShellCodeErrorText      = "Shell Code Error."
  817. [DialogConstantsENG]
  818. Help        = "&Help"
  819. Exit        = "Cancel"
  820. OK          = "OK"
  821. HelpContext = ""
  822. Continue    = "Continue"
  823. Cancel      = "Cancel"
  824. [FileDependentDlgENG]
  825. Edit1Label = "&Network Address:"
  826. DlgType = "Edit"
  827. DlgTemplate = "NETWORK_NUMBER"
  828. Caption = $(FunctionTitle)
  829. HelpContext = $(!IDH_DB_OEMNADNF_INS)
  830. EditTextLim = 17
  831. EditTextIn  = $(NetworkAddress)
  832. EditFocus   = "ALL"
  833. RCCtlFocusOn = 403
  834.